package com.ruoyi.media.forestApi;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestResponse;

import java.util.Map;

/**
 * 视频号所有请求
 */
@BaseRequest(
        baseURL = "https://creator.douyin.com", // 默认域名
        headers = {

        }
)
public interface DouyinApi {

    /**
     * 获取抖音用户页数据
     * @return
     */
    @Get(url = "${url}",headers = {
            "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.41",
            "${cookies}"
    })
    ForestResponse jiexidouyin(@Var("url")String url,@Var("cookies")String cookies);


    @Post(url = "http://localhost:12080/go")
    String getDouyinUserInfo(@Query Map<String,Object> param);


    /**
     * 获取链接参数
     * @param url
     * @return
     */
    @Redirection
    @Get(url = "${url}",headers = {
        "Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
        "X-Requested-With: com.tencent.mm",
        "User-Agent: Mozilla/5.0 (Linux; Android 13; Mi 10 Pro Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5049 MMWEBSDK/20230303 MMWEBID/4062 MicroMessenger/8.0.34.2340(0x28002259) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64",
    })
    ForestResponse getWechatData(@Var("url")String url);

}
